Learn R Programming

xgboost (version 1.7.6.1)

xgb.set.config, xgb.get.config: Set and get global configuration

Description

Global configuration consists of a collection of parameters that can be applied in the global scope. See https://xgboost.readthedocs.io/en/stable/parameter.html for the full list of parameters supported in the global configuration. Use xgb.set.config to update the values of one or more global-scope parameters. Use xgb.get.config to fetch the current values of all global-scope parameters (listed in https://xgboost.readthedocs.io/en/stable/parameter.html).

Usage

xgb.set.config(...)

xgb.get.config()

Value

xgb.set.config returns TRUE to signal success. xgb.get.config returns a list containing all global-scope parameters and their values.

Arguments

...

List of parameters to be set, as keyword arguments

Examples

Run this code
# Set verbosity level to silent (0)
xgb.set.config(verbosity = 0)
# Now global verbosity level is 0
config <- xgb.get.config()
print(config$verbosity)
# Set verbosity level to warning (1)
xgb.set.config(verbosity = 1)
# Now global verbosity level is 1
config <- xgb.get.config()
print(config$verbosity)

Run the code above in your browser using DataLab